import React from 'react';
import Home from "./home"
import Location from "./location"
import Message from "./message"
import Shop from "./shop"
import My from "./my"
import { createBottomTabNavigator } from "@react-navigation/bottom-tabs";
import { AntDesign } from '@expo/vector-icons';


const Tabs = createBottomTabNavigator();
const tabScreenOptions = (label: string, iconName: string) => ({
  tabBarLabel: label,
  tabBarIcon: ({ color, size }) => <AntDesign name={iconName} color={color} size={20} />,
})
export default function TabLayout() {
  

  return (
    <Tabs.Navigator
      id={undefined}
      screenOptions={{ headerShown: false }}>
      <Tabs.Screen name='HomeScreen' component={Home} options={tabScreenOptions('首页', 'home')} />
      <Tabs.Screen name='LocationScreen' component={Location} options={tabScreenOptions('位置', 'home')} />
      <Tabs.Screen name='ShopScreen' component={Shop} options={tabScreenOptions('商城', 'shoppingcart')} />
      <Tabs.Screen name='MessageScreen' component={Message} options={tabScreenOptions('消息', 'message1')} />
      <Tabs.Screen name='MyScreen' component={My} options={tabScreenOptions('我的', 'user')} />
    </Tabs.Navigator>
  );
}
